package org.ch00.test06;

/**
 * @author ZJL
 * @date 2025-03-03
 */
public class User {
    private String name;

    public User() {

    }

    public User(String name) {
        setName(name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public void UsePay(Payment payment) {
        System.out.println(this.name + "选择的支付方式：");
        payment.pay();
    }
}
